#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>
int main()
{
    double x, y, x1, y1, x2, y2, px, py;
    scanf("%lf%lf", &px, &py);
    scanf("%lf%lf", &x, &y);
    scanf("%lf%lf", &x1, &y1);
    scanf("%lf%lf", &x2, &y2);
    double area, area1, area2, area3, eps;
    area = fabs((x1 - x) * (y2 - y) - (x2 - x) * (y1 - y));
    area1 = fabs((x - px) * (y1 - py) - (x1 - px) * (y - py));
    area2 = fabs((x1 - px) * (y2 - py) - (x2 - px) * (y1 - py));
    area3 = fabs((x2 - px) * (y - py) - (x - px) * (y2 - py));
    eps = 1e-12;
    if (fabs(area1 + area2 + area3) <= fabs(area))
    {
        if ((area1) == 0 || (area2) == 0 || (area3) == 0)
        {
            printf("On");
        }
        else
        {
            printf("In");
        }
    }
    else
    {
        printf("Out");
    }
    return 0;
}